@(name:String)
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<h1>Hello @name !!!</h1>
<input id="message"/> <button onclick="javascript:send();">发送</button>
<div id="msg"></div>
</body>

<script>

    var wsurl = "ws://localhost:6696/ws";
    var ws = null;
    if ('WebSocket' in window) {
        ws = new WebSocket(wsurl);
    } else if ('MozWebSocket' in window) {
        ws = new MozWebSocket(wsurl + "?uid=" + uid);
    } else {
        console.error("初始化 Main websocket 对象失败！");
    }

    ws.onopen = function (event) {
        var msg = "Hi";
        ws.send(msg)
    }
    ws.onmessage = function (event) {
        console.info(event.data);
        var data = new Date();
        document.getElementById("msg").innerHTML += "<h5>"+data.toTimeString()+" : "+event.data+"</h5>";
    }

    function send(){
        var msg = document.getElementById("message").value;
        ws.send(msg);
    }
</script>
</html>